﻿#include "chinese.h"
#pragma once

#include <QString>

#include "config/appconfigitems.h"
#include "configmanager.h"

class AppConfig : public ConfigManager {
public:
    static AppConfig &instance() {
        static AppConfig pmsConfig;
        return pmsConfig;
    }

public:
    bool configOK() const;

    /// 读取配置文件
    bool loadConfig();

    /// 检查并恢复配置文件
    virtual bool checkAndRestoreConfigFile(bool force);

private:
    AppConfig(); // 私有构造函数

    // 禁止拷贝和赋值
    Q_DISABLE_COPY(AppConfig)

    // 禁止移动构造和赋值
    Q_DISABLE_MOVE(AppConfig)

private:
    QString m_baseConfigFilePath;
    bool m_configOK;
};
